﻿using K9Nano.Reporting.MySQL.Internals;
using Microsoft.Extensions.DependencyInjection;

namespace K9Nano.Reporting;

public static class MySqlReportingStartupExtensions
{
    public static IK9AppBuilder UseMySqlReporting(this IK9AppBuilder app, string connectionString)
    {
        app.Services.AddSingleton<IReportingEngineConnectionFactory>(
            _ => new MySqlReportingEngineConnectionFactory(connectionString));
        return app;
    }
}

